﻿CREATE TABLE [dbo].[core_page] (
    [Id]                        UNIQUEIDENTIFIER NOT NULL,
    [SiteId]                    UNIQUEIDENTIFIER NOT NULL,
    [Code]                      NVARCHAR (MAX)   NULL,
    [Caption]                   NVARCHAR (MAX)   NULL,
    [TemplateId]                UNIQUEIDENTIFIER NULL,
    [Type]                      NVARCHAR (MAX)   NULL,
    [Url]                       NVARCHAR (MAX)   NULL,
    [IsInheritedSiteNavigation] BIT              NOT NULL,
    CONSTRAINT [PK_dbo.core_page] PRIMARY KEY NONCLUSTERED ([Id] ASC),
    CONSTRAINT [FK_dbo.core_page_dbo.core_pagetemplate_TemplateId] FOREIGN KEY ([TemplateId]) REFERENCES [dbo].[core_pagetemplate] ([Id])
);


GO
CREATE NONCLUSTERED INDEX [IX_TemplateId]
    ON [dbo].[core_page]([TemplateId] ASC);

